package com.starlink.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.starlink.model.request.save.MallPeripherySaveRequest;
import com.starlink.model.vo.MallBooksVO;
import org.springframework.data.domain.Pageable;
import com.starlink.model.domain.MallPeripheryDO;
import com.starlink.model.request.MallPeripheryRequest;
import com.starlink.model.vo.MallPeripheryVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface MallPeripheryService extends IService<MallPeripheryDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    MallPeripheryVO getByKey(long id);
    /**
     * 周边商品分页查询
     * @param request
     * @return
     */
    PageInfo<List<MallPeripheryVO>> pageQuery(Pageable pageable,MallPeripherySaveRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<MallPeripheryVO> listQuery(MallPeripheryRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Long add(MallPeripheryRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(MallPeripheryRequest request);
    /**
     * 根据主键删除
     * @param ids
     * @return
     */
    Boolean deleteDOByIds(String ids);

    /**
     * 周边商品编辑新增
     * @param request
     * @return
     */
    Boolean insertOrUpdateDO(MallPeripherySaveRequest request);

    /**
     * 周边商品列表分页查询(小程序端)
     * @param pageable
     * @param request
     * @return
     */
    PageInfo<List<MallPeripheryVO>> pageList(Pageable pageable, MallPeripherySaveRequest request);
}
